{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import boolean as bl\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def rand_bv(n):\n",
    "    a=np.random.rand(1,n)\n",
    "    x=a>0.5\n",
    "    return x[0].tolist()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[True, False, False, True, True, True, False, False, True, True, True, False]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vx=rand_bv(12)\n",
    "vx"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "ov=bl.qtimes_bv_bv(vx,vy)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "def qtimes_bv_bm(bv1,bm1):\n",
    "    temp=[bl.qtimes_bv_bv(bv1,x) for x in (list(bm1))]\n",
    "    return np.array(temp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[False, False, False,  True,  True, False, False, False,  True,\n",
       "         True,  True,  True],\n",
       "       [ True, False, False, False, False, False,  True, False,  True,\n",
       "        False,  True, False],\n",
       "       [False,  True, False,  True, False, False, False, False,  True,\n",
       "        False, False,  True],\n",
       "       [ True, False,  True,  True,  True, False,  True, False, False,\n",
       "        False, False, False],\n",
       "       [ True, False,  True,  True,  True,  True,  True,  True, False,\n",
       "        False, False,  True]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a=np.random.rand(5,12)\n",
    "bm1=a>0.5\n",
    "bm1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[False,  True,  True,  True,  True, False, False, False,  True,\n",
       "         True, False,  True],\n",
       "       [ True,  True,  True, False, False, False,  True, False,  True,\n",
       "        False, False, False],\n",
       "       [False, False,  True,  True, False, False, False, False,  True,\n",
       "        False,  True,  True],\n",
       "       [ True,  True, False,  True,  True, False,  True, False, False,\n",
       "        False,  True, False],\n",
       "       [ True,  True, False,  True,  True,  True,  True,  True, False,\n",
       "        False,  True,  True]])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "res=qtimes_bv_bm(vx,bm1)\n",
    "res\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
